#! /usr/bin/python3
# -*- coding: UTF-8 -*-

if __name__ == "__main__":
	raise Exception("不支持从这里调用")

__version__ = "1.0"
__all__ = ["MouseChshSql"]

'''
SELECT
	MAPPING
		SHOW
	FROM
		TABLE
		JOIN
			TABLE left link
			TABLE right link
	WHERE
		EXPRESSION
			COLUMN left
			VALUE right
			SELECT right link
			INPUT right
		AND
			EXPRESSION link
			AND link
			OR link
		OR
			EXPRESSION link
			AND link
			OR link
<SELECT>
	<MAPPING>
		<SHOW as="别名1" table="表别名1">列名1</SHOW>
		<SHOW as="别名2" table="表别名2">列名2</SHOW>
	</MAPPING>
	<FROM>
		<JOIN>
			<TABLE as="别名1">表名1</TABLE>
			<TABLE as="别名2">表名2</TABLE>
		</JOIN>
	</FROM>
	<WHERE>
		<AND>
			<EXPRESSION option="相等">
				<COLUMN table="表别名1">列名1</COLUMN>
				<VALUE type="字符串"></VALUE>
			</EXPRESSION>
			<EXPRESSION option="相等">
				<COLUMN table="表别名2">列名2</COLUMN>
				<INPUT type="字符串" key="参数1"></INPUT>
			</EXPRESSION>
		</AND>
	</WHERE>
</SELECT>
INSERT
	FROM
		TABLE
	VALUES
		ITEM
<INSERT>
	<FROM>
		<TABLE>表名1</TABLE>
	<VALUES>
		<ITEM column="列名1">数据1</ITEM>
		<ITEM column="列名2">数据2</ITEM>
	</VALUES>
</INSERT>
UPDATE
	SET
		ITEM
	FROM
		TABLE
		JOIN
			TABLE link
	WHERE
		EXPRESSION
			COLUMN left
			VALUE right
			SELECT right link
			INPUT right
		AND
			EXPRESSION link
			AND link
			OR link
		OR
			EXPRESSION link
			AND link
			OR link
<UPDATE>
	<SET>
		<ITEM column="列名1">数据1</ITEM>
		<ITEM column="列名2">数据2</ITEM>
	</SET>
	<FROM>
		<JOIN>
			<TABLE as="别名1">表名1</TABLE>
			<TABLE as="别名2">表名2</TABLE>
		</JOIN>
	</FROM>
	<WHERE>
		<AND>
			<EXPRESSION option="相等">
				<COLUMN table="表别名1">列名1</COLUMN>
				<VALUE type="字符串"></VALUE>
			</EXPRESSION>
			<EXPRESSION option="相等">
				<COLUMN table="表别名2">列名2</COLUMN>
				<INPUT type="字符串" key="参数1"></INPUT>
			</EXPRESSION>
		</AND>
	</WHERE>
</UPDATE>
DELETE
	FROM
		TABLE
		JOIN
			TABLE link
	WHERE
		EXPRESSION
			COLUMN left
			VALUE right
			SELECT right link
			INPUT right
		AND
			EXPRESSION link
			AND link
			OR link
		OR
			EXPRESSION link
			AND link
			OR link
<DELETE>
	<FROM>
		<JOIN>
			<TABLE as="别名1">表名1</TABLE>
			<TABLE as="别名2">表名2</TABLE>
		</JOIN>
	</FROM>
	<WHERE>
		<AND>
			<EXPRESSION option="相等">
				<COLUMN table="表别名1">列名1</COLUMN>
				<VALUE type="字符串"></VALUE>
			</EXPRESSION>
			<EXPRESSION option="相等">
				<COLUMN table="表别名2">列名2</COLUMN>
				<INPUT type="字符串" key="参数1"></INPUT>
			</EXPRESSION>
		</AND>
	</WHERE>
</DELETE>
'''


class MouseChshSql:

	def parse(self, text):
		pass

	def to_string(self):
		pass
